var $ = getApp(), methods = require("../methods.js");
Page(Object.assign({}, methods, {
	data: {
		userinfo: [],
		money: '',
		moneyduan:0
	},
	_onLoad: function (options) {
		var that = this
	},
	subconfirm: function (e) {
		var that = this
		var dhcode = e.detail.value.dhcode;
		$.post('lipin/index', { dhcode: dhcode }, function (res) {
			if (res.status == 0) {
				$.error(res.msg);
				return;
			}
			if(res.status==1){
				$.alert(res.msg,function(){
					$.goto('/pages/my/usercenter');
				});
			}
			if(res.status==2){
				$.success(res.msg);
				setTimeout(function () {
					$.goto('/pages/lipin/prodh?dhcode='+dhcode);
				}, 1000)
			}
		})
	}
}))